package com.autumn.cloud.demo.consumer.utils;

import com.autumn.exception.AutumnException;
import com.autumn.exception.ErrorLevel;

/**
 * 熔断异常
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-12-11 17:41
 **/
public class ApiException extends AutumnException {

    /**
     * 熔断错语代码
     */
    public static final int HYSTRIX_ERROR_CODE = 3066;

    private static final long serialVersionUID = 1653167598514912483L;

    /**
     * 实例化
     *
     * @param errorCode
     * @param level
     * @param message
     */
    public ApiException(int errorCode, ErrorLevel level, String message) {
        super(message);
        this.setCode(errorCode);
        this.setLevel(level);
    }
}
